package com.rd.student.dashuju.wangbo.exercise0728;

import java.io.File;
import java.io.FileReader;
import java.io.Reader;

public class TestReader {

    public static void main(String[] args) throws Exception{
        File file = new File("stream.txt");
        ttt(file);
    }

    public static void ttt(File file) throws Exception{
        Reader reader = new FileReader(file);
        char[] chars = new char[(int) file.length()];
        reader.read(chars);
        String s = new String(chars);
        System.out.println(s);
        reader.close();
    }
}
